home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8253 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  728 b 

  1. Path: prodigy.com!usenet
  2. From: FBRS77A@prodigy.com (Gregory Nagawiecki)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: system() & error detection
  5. Date: 2 Mar 1996 19:01:16 GMT
  6. Organization: Prodigy Services Company  1-800-PRODIGY
  7. Distribution: world
  8. Message-ID: <4ha5ts$l7a@usenetw1.news.prodigy.com>
  9. References: <4gt24g$dba@ncar.ucar.edu> <4gt7f4innt1j@keats.ugrad.cs.ubc.ca> <4h36nl$6g0@clarknet.clark.net>
  10. NNTP-Posting-Host: inugap6.news.prodigy.com
  11. X-Newsreader: Version 1.2
  12.  
  13. When using system(), the exit status of the command is returned in the 
  14. higher order byte.
  15.  
  16. Thus, your code would look like
  17.  
  18.     status = system(" ... ") / 256;
  19.  
  20. The lower order byte is used for other status info.   
  21.  
  22. Greg Nagawiecki
  23. SW Eng (12 yrs exp.)  
  24.  
  25.